<template>
    <div>   
        <h1>这是Vue2的写法</h1>
        <p>这是按钮:<button @click="thisIsBtn">按钮</button></p>
        <p>Count:{{count}}</p>
    </div>
</template>

<script lang="ts">
import {defineComponent,getCurrentInstance} from 'vue'
export default defineComponent({
    data(){
        return{
            count:0
        }
    },
    methods:{
        thisIsBtn(){
            getCurrentInstance().appContext.config.globalProperties

            this.count++
        }
    }
})
</script>

<style lang="scss" scoped>

</style>